Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Using a Web object time-out handler
To use a time-out handler for a Web object, set the
Web-Timeout-Handlerattribute to the name of a procedure or Web object that you want to run when the state-aware Web object times-out. You only need to set this attribute once, so the best place to set the attribute is in the Main Code Block or a local initialize event procedure for the Web object.Set the attribute using the set-attribute-list method procedure:
The procedure specified as the
Web-Timeout-Handleris stored both as the handle of the state-aware Web object and as part of its Web object cookie. This supports the situation where the state-aware Web object times-out and is deleted. Even if the Web object is deleted, theWeb-Timeout-Handlercan still be retrieved from the cookie.Here is an example of HTTP headers generated by WebSpeed for a Web object containing the
Web-Timeout-Handlerattribute:
As you can see, the
Web-Timeout-Handler(login.w) is appended to the end of the Web object cookie, which contains the value of the SpeedScriptUNIQUE-IDprocedure attribute for the state-aware Web object.After a time-out occurs, WebSpeed retrieves the time-out handler name from the cookie of the timed-out state-aware Web object during the next Web request and runs the procedure by that name. If the time-out handler procedure is itself an HTML-mapping Web object, note that WebSpeed executes the section of
process-web-requestthat handles the appropriate request method, usually aPOST.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |